\hypertarget{stringsup_8h}{}\section{lib/stringsup.h File Reference}
\label{stringsup_8h}\index{lib/stringsup.\+h@{lib/stringsup.\+h}}


Various string and character functions.  


\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{stringsup_8h_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE}
\item 
\#define \hyperlink{stringsup_8h_a399da2caab82ec1bb3d5a8fbc5306768}{W\+E\+A\+K\+\_\+\+A\+TR}~\hyperlink{user__task_8c_ade20ba3eb51f42d2b2deb917303c9a5e}{\+\_\+\+\_\+attribute\+\_\+\+\_\+}((weak))
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} void \hyperlink{stringsup_8h_afb71eee07aa9545ed2ec23f865eea315}{sep} (void)
\begin{DoxyCompactList}\small\item\em undo any existing macros \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{mmc__hal_8h_a399da2caab82ec1bb3d5a8fbc5306768}{W\+E\+A\+K\+\_\+\+A\+TR} \hyperlink{stringsup_8h_a8c33a3f5b4322e705d3403f63d55b0a1}{isdigit} (int c)
\begin{DoxyCompactList}\small\item\em test if a character is a digit \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{mmc__hal_8h_a399da2caab82ec1bb3d5a8fbc5306768}{W\+E\+A\+K\+\_\+\+A\+TR} \hyperlink{stringsup_8h_aa1caa55b6624cc08af06c04cbfe6c02a}{isupper} (int c)
\begin{DoxyCompactList}\small\item\em Is a character upper case. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{mmc__hal_8h_a399da2caab82ec1bb3d5a8fbc5306768}{W\+E\+A\+K\+\_\+\+A\+TR} \hyperlink{stringsup_8h_a15c5aeb16e6527e860098b0e062168b5}{islower} (int c)
\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{mmc__hal_8h_a399da2caab82ec1bb3d5a8fbc5306768}{W\+E\+A\+K\+\_\+\+A\+TR} \hyperlink{stringsup_8h_a1825e0085bbbce998b39f9ff2682173c}{tolower} (int c)
\begin{DoxyCompactList}\small\item\em Convert character to lower case, only if it is upper case. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{mmc__hal_8h_a399da2caab82ec1bb3d5a8fbc5306768}{W\+E\+A\+K\+\_\+\+A\+TR} \hyperlink{stringsup_8h_a96a73ab9e374d97a249f39eb6875ba79}{toupper} (int c)
\begin{DoxyCompactList}\small\item\em Convert character to upper case, only if it is lower case. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} void $\ast$ \hyperlink{stringsup_8h_a76693775d57cf00d7cdb2e793ffd73f1}{memchr} (const void $\ast$str, int c, \hyperlink{cpu_8h_aea0c7eab1ce1eebb4e879ef4e23c16ee}{size\+\_\+t} size)
\begin{DoxyCompactList}\small\item\em find a character in a string of maximum size \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} \hyperlink{cpu_8h_aea0c7eab1ce1eebb4e879ef4e23c16ee}{size\+\_\+t} \hyperlink{mmc__hal_8h_a399da2caab82ec1bb3d5a8fbc5306768}{W\+E\+A\+K\+\_\+\+A\+TR} \hyperlink{stringsup_8h_a895ea3a2f9901e4c962806cc15271339}{strlen} (const char $\ast$str)
\begin{DoxyCompactList}\small\item\em String Length. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} \hyperlink{mmc__hal_8h_a399da2caab82ec1bb3d5a8fbc5306768}{W\+E\+A\+K\+\_\+\+A\+TR} char $\ast$ \hyperlink{stringsup_8h_ad88a87f58b2b4a12f6644aa46ecc1baa}{strcpy} (char $\ast$dest, const char $\ast$src)
\begin{DoxyCompactList}\small\item\em copy a string \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} \hyperlink{mmc__hal_8h_a399da2caab82ec1bb3d5a8fbc5306768}{W\+E\+A\+K\+\_\+\+A\+TR} char $\ast$ \hyperlink{stringsup_8h_acdb13cf3724e976e98a6178baf0a3ac5}{strncpy} (char $\ast$dest, const char $\ast$src, \hyperlink{cpu_8h_aea0c7eab1ce1eebb4e879ef4e23c16ee}{size\+\_\+t} size)
\begin{DoxyCompactList}\small\item\em copy a string of at most N characters \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} \hyperlink{mmc__hal_8h_a399da2caab82ec1bb3d5a8fbc5306768}{W\+E\+A\+K\+\_\+\+A\+TR} char $\ast$ \hyperlink{stringsup_8h_a5c9fb6fae0723d90a3b652ad6d869eb4}{strcat} (char $\ast$dest, const char $\ast$src)
\begin{DoxyCompactList}\small\item\em Append string. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} \hyperlink{mmc__hal_8h_a399da2caab82ec1bb3d5a8fbc5306768}{W\+E\+A\+K\+\_\+\+A\+TR} char $\ast$ \hyperlink{stringsup_8h_af7f9d4db489856461ccf1c577b0035a5}{strncat} (char $\ast$dest, const char $\ast$src, \hyperlink{cpu_8h_aea0c7eab1ce1eebb4e879ef4e23c16ee}{size\+\_\+t} max)
\begin{DoxyCompactList}\small\item\em Append string of at most N bytes from src. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} void \hyperlink{mmc__hal_8h_a399da2caab82ec1bb3d5a8fbc5306768}{W\+E\+A\+K\+\_\+\+A\+TR} \hyperlink{stringsup_8h_a00b9d97be21e4f3f5df1019a803c05a6}{reverse} (char $\ast$str)
\begin{DoxyCompactList}\small\item\em Reverse a string in place Example\+: abcdef -\/$>$ fedcba. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} void \hyperlink{mmc__hal_8h_a399da2caab82ec1bb3d5a8fbc5306768}{W\+E\+A\+K\+\_\+\+A\+TR} \hyperlink{stringsup_8h_a25ac5a1dbdfa1d06d55448cd7b665d1d}{strupper} (char $\ast$str)
\begin{DoxyCompactList}\small\item\em U\+P\+P\+E\+R\+C\+A\+SE a string. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} void \hyperlink{stringsup_8h_a2d7ec9dae4f58c027edbc22118714ba6}{trim\+\_\+tail} (char $\ast$str)
\begin{DoxyCompactList}\small\item\em Trim White space and control characters from end of string. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} char $\ast$ \hyperlink{stringsup_8h_a8cebaf955a9e3b5f1f2af105641dad40}{skipspaces} (char $\ast$ptr)
\begin{DoxyCompactList}\small\item\em Skip white space in a string -\/ tabs and spaces. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} char $\ast$ \hyperlink{stringsup_8h_a205ab859e76086c5239a49effa3281dd}{nextspace} (char $\ast$ptr)
\begin{DoxyCompactList}\small\item\em Skip to first white space in a string -\/ tabs and spaces. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} char $\ast$ \hyperlink{stringsup_8h_aae86b90fc6ccc0c432de5c492cdcbaba}{skipchars} (char $\ast$str, char $\ast$pat)
\begin{DoxyCompactList}\small\item\em Skip characters defined in user string. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{mmc__hal_8h_a399da2caab82ec1bb3d5a8fbc5306768}{W\+E\+A\+K\+\_\+\+A\+TR} \hyperlink{stringsup_8h_abee00aec80e542c31b536a531ffe761a}{strcmp} (const char $\ast$str, const char $\ast$pat)
\begin{DoxyCompactList}\small\item\em Compare two strings. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{mmc__hal_8h_a399da2caab82ec1bb3d5a8fbc5306768}{W\+E\+A\+K\+\_\+\+A\+TR} \hyperlink{stringsup_8h_ac8c58d100b5e1ef176592486bb150bbc}{strncmp} (const char $\ast$str, const char $\ast$pat, \hyperlink{cpu_8h_aea0c7eab1ce1eebb4e879ef4e23c16ee}{size\+\_\+t} len)
\begin{DoxyCompactList}\small\item\em Compare two strings maximum len bytes in size. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{mmc__hal_8h_a399da2caab82ec1bb3d5a8fbc5306768}{W\+E\+A\+K\+\_\+\+A\+TR} \hyperlink{stringsup_8h_a5b20054fe279135f819d1c561f081649}{strcasecmp} (const char $\ast$str, const char $\ast$pat)
\begin{DoxyCompactList}\small\item\em Compare two strings without case. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{mmc__hal_8h_a399da2caab82ec1bb3d5a8fbc5306768}{W\+E\+A\+K\+\_\+\+A\+TR} \hyperlink{stringsup_8h_af2fdec8b4be40840ac03df58d48bcc8d}{strncasecmp} (const char $\ast$str, const char $\ast$pat, \hyperlink{cpu_8h_aea0c7eab1ce1eebb4e879ef4e23c16ee}{size\+\_\+t} len)
\begin{DoxyCompactList}\small\item\em Compare two strings without case maximum len bytes in size. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{stringsup_8h_a9fb9c5c9b25cdf504152f7610f0d118c}{M\+A\+T\+CH} (char $\ast$str, char $\ast$pat)
\begin{DoxyCompactList}\small\item\em Compare two strings. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{stringsup_8h_ae330bc7e8f9c442404f44ca0187b27d3}{M\+A\+T\+C\+H\+A\+R\+GS} (char $\ast$str, char $\ast$pat, int min, int argc)
\begin{DoxyCompactList}\small\item\em Match two strings and compare argument index Display message if the number of arguments is too few. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{stringsup_8h_a158b18efacfbaf45bf46e03f355cf101}{M\+A\+T\+C\+HI} (char $\ast$str, char $\ast$pat)
\begin{DoxyCompactList}\small\item\em Compare two strings without case. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{stringsup_8h_ac85ba7d5161939102f1daf99dcae85f0}{M\+A\+T\+C\+H\+\_\+\+L\+EN} (char $\ast$str, char $\ast$pat)
\begin{DoxyCompactList}\small\item\em Compare two strings limted to length of pattern. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{stringsup_8h_ab012fa46a47fa2430d6ebd25ed38c59e}{M\+A\+T\+C\+H\+I\+\_\+\+L\+EN} (char $\ast$str, char $\ast$pat)
\begin{DoxyCompactList}\small\item\em Compare two strings without case limted to length of pattern. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{stringsup_8h_a84aa635d9cf4f3d41608b9e5639f71e9}{split\+\_\+args} (char $\ast$str, char $\ast$argv\mbox{[}$\,$\mbox{]}, int max)
\begin{DoxyCompactList}\small\item\em Split string into arguments stored in argv\mbox{[}\mbox{]} We split source string into arguments Warning\+: source string is modified! To save memory each gap in the source string is terminated with an E\+OS This becomes the end of string for each argument returned Warning\+: Do N\+OT modify the source string or argument contents while using them You can reassign new pointers to the arguments if you like. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} char $\ast$ \hyperlink{stringsup_8h_a9387f7db4933b1bafd14bddad8e8c9c8}{get\+\_\+token} (char $\ast$str, char $\ast$\hyperlink{stringsup_8h_ae9142769a957bcb8c0fad1934576f576}{token}, int max)
\begin{DoxyCompactList}\small\item\em return next token \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} int \hyperlink{stringsup_8h_ae9142769a957bcb8c0fad1934576f576}{token} (char $\ast$str, char $\ast$pat)
\begin{DoxyCompactList}\small\item\em Search for token in a string matching user pattern. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} \hyperlink{earth2wireframe_8c_a32f2e37ee053cf2ce8ca28d1f74630e5}{int32\+\_\+t} \hyperlink{stringsup_8h_a9cc256e4952848245227600da2552e34}{get\+\_\+value} (char $\ast$str)
\begin{DoxyCompactList}\small\item\em get a number \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} char $\ast$ \hyperlink{stringsup_8h_a11f9265694fbed4de67d91c6959a0d18}{strnalloc} (char $\ast$str, int len)
\begin{DoxyCompactList}\small\item\em Allocate space for string with maximum size. \end{DoxyCompactList}\item 
\hyperlink{earth2wireframe_8c_ad0fe97585b8891f5e4f2b9a6426330a4}{M\+E\+M\+S\+P\+A\+CE} char $\ast$ \hyperlink{stringsup_8h_a354472f280e9fe08820d6f32e0feddae}{stralloc} (char $\ast$str)
\begin{DoxyCompactList}\small\item\em Allocate space for string. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Various string and character functions. 

\begin{DoxyParagraph}{Copyright \copyright{} 2016 Mike Gore, G\+PL License}

\end{DoxyParagraph}
\begin{DoxyParagraph}{You are free to use this code under the terms of G\+PL}
please retain a copy of this notice in any code you use it in.
\end{DoxyParagraph}
This is free software\+: you can redistribute it and/or modify it under the terms of the G\+NU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but W\+I\+T\+H\+O\+UT A\+NY W\+A\+R\+R\+A\+N\+TY; without even the implied warranty of M\+E\+R\+C\+H\+A\+N\+T\+A\+B\+I\+L\+I\+TY or F\+I\+T\+N\+E\+SS F\+OR A P\+A\+R\+T\+I\+C\+U\+L\+AR P\+U\+R\+P\+O\+SE. See the G\+NU General Public License for more details.

You should have received a copy of the G\+NU General Public License along with this program. If not, see \href{http://www.gnu.org/licenses/}{\tt http\+://www.\+gnu.\+org/licenses/}. 

\subsection{Macro Definition Documentation}
\index{stringsup.\+h@{stringsup.\+h}!M\+E\+M\+S\+P\+A\+CE@{M\+E\+M\+S\+P\+A\+CE}}
\index{M\+E\+M\+S\+P\+A\+CE@{M\+E\+M\+S\+P\+A\+CE}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{M\+E\+M\+S\+P\+A\+CE}{MEMSPACE}}]{\setlength{\rightskip}{0pt plus 5cm}\#define M\+E\+M\+S\+P\+A\+CE}\hypertarget{stringsup_8h_ad0fe97585b8891f5e4f2b9a6426330a4}{}\label{stringsup_8h_ad0fe97585b8891f5e4f2b9a6426330a4}


Definition at line 28 of file stringsup.\+h.

\index{stringsup.\+h@{stringsup.\+h}!W\+E\+A\+K\+\_\+\+A\+TR@{W\+E\+A\+K\+\_\+\+A\+TR}}
\index{W\+E\+A\+K\+\_\+\+A\+TR@{W\+E\+A\+K\+\_\+\+A\+TR}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{W\+E\+A\+K\+\_\+\+A\+TR}{WEAK_ATR}}]{\setlength{\rightskip}{0pt plus 5cm}\#define W\+E\+A\+K\+\_\+\+A\+TR~{\bf \+\_\+\+\_\+attribute\+\_\+\+\_\+}((weak))}\hypertarget{stringsup_8h_a399da2caab82ec1bb3d5a8fbc5306768}{}\label{stringsup_8h_a399da2caab82ec1bb3d5a8fbc5306768}


Definition at line 33 of file stringsup.\+h.



Referenced by isdigit(), islower(), isupper(), memchr(), reverse(), sep(), skipchars(), strcasecmp(), strcat(), strcmp(), strcpy(), strlen(), strncat(), strncmp(), strncpy(), and tolower().



\subsection{Function Documentation}
\index{stringsup.\+h@{stringsup.\+h}!get\+\_\+token@{get\+\_\+token}}
\index{get\+\_\+token@{get\+\_\+token}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{get\+\_\+token(char $\ast$str, char $\ast$token, int max)}{get_token(char *str, char *token, int max)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} char$\ast$ get\+\_\+token (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{str, }
\item[{char $\ast$}]{token, }
\item[{int}]{max}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a9387f7db4933b1bafd14bddad8e8c9c8}{}\label{stringsup_8h_a9387f7db4933b1bafd14bddad8e8c9c8}


return next token 


\begin{DoxyItemize}
\item Skips all non printable A\+S\+C\+II characters before token
\item Token returns only printable A\+S\+C\+II
\end{DoxyItemize}


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & string to search. \\
\hline
\mbox{\tt out}  & {\em token} & token to return \\
\hline
\mbox{\tt in}  & {\em max} & maximum token size\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer past token on success . 

N\+U\+LL if no token found
\end{DoxyReturn}
return next token


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em $\ast$str} & string \\
\hline
\mbox{\tt out}  & {\em $\ast$token} & token characters greter then space less then 0x7f \\
\hline
\mbox{\tt in}  & {\em max} & maximum length of token \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\+: string pointer to character after token 
\end{DoxyReturn}


Definition at line 628 of file stringsup.\+c.

\index{stringsup.\+h@{stringsup.\+h}!get\+\_\+value@{get\+\_\+value}}
\index{get\+\_\+value@{get\+\_\+value}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{get\+\_\+value(char $\ast$str)}{get_value(char *str)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} {\bf int32\+\_\+t} get\+\_\+value (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{str}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a9cc256e4952848245227600da2552e34}{}\label{stringsup_8h_a9cc256e4952848245227600da2552e34}


get a number 


\begin{DoxyItemize}
\item Used only for debugging 
\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & string to examine\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
value 
\end{DoxyReturn}

\end{DoxyItemize}

Definition at line 706 of file stringsup.\+c.

\index{stringsup.\+h@{stringsup.\+h}!isdigit@{isdigit}}
\index{isdigit@{isdigit}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{isdigit(int c)}{isdigit(int c)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int {\bf W\+E\+A\+K\+\_\+\+A\+TR} isdigit (
\begin{DoxyParamCaption}
\item[{int}]{c}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a8c33a3f5b4322e705d3403f63d55b0a1}{}\label{stringsup_8h_a8c33a3f5b4322e705d3403f63d55b0a1}


test if a character is a digit 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em c} & character \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true or false 
\end{DoxyReturn}


Definition at line 48 of file stringsup.\+c.

\index{stringsup.\+h@{stringsup.\+h}!islower@{islower}}
\index{islower@{islower}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{islower(int c)}{islower(int c)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int {\bf W\+E\+A\+K\+\_\+\+A\+TR} islower (
\begin{DoxyParamCaption}
\item[{int}]{c}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a15c5aeb16e6527e860098b0e062168b5}{}\label{stringsup_8h_a15c5aeb16e6527e860098b0e062168b5}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em c} & character.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 of lower case, else 0 
\end{DoxyReturn}


Definition at line 80 of file stringsup.\+c.



Referenced by toupper().

\index{stringsup.\+h@{stringsup.\+h}!isupper@{isupper}}
\index{isupper@{isupper}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{isupper(int c)}{isupper(int c)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int {\bf W\+E\+A\+K\+\_\+\+A\+TR} isupper (
\begin{DoxyParamCaption}
\item[{int}]{c}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_aa1caa55b6624cc08af06c04cbfe6c02a}{}\label{stringsup_8h_aa1caa55b6624cc08af06c04cbfe6c02a}


Is a character upper case. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em c} & character.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 of upper case, else 0 
\end{DoxyReturn}


Definition at line 64 of file stringsup.\+c.



Referenced by tolower().

\index{stringsup.\+h@{stringsup.\+h}!M\+A\+T\+CH@{M\+A\+T\+CH}}
\index{M\+A\+T\+CH@{M\+A\+T\+CH}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{M\+A\+T\+C\+H(char $\ast$str, char $\ast$pat)}{MATCH(char *str, char *pat)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int M\+A\+T\+CH (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{str, }
\item[{char $\ast$}]{pat}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a9fb9c5c9b25cdf504152f7610f0d118c}{}\label{stringsup_8h_a9fb9c5c9b25cdf504152f7610f0d118c}


Compare two strings. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & string to match. \\
\hline
\mbox{\tt in}  & {\em pat} & pattern to compare.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
string lenth on match. 

0 on no match. 
\end{DoxyReturn}


Definition at line 455 of file stringsup.\+c.



Referenced by M\+A\+T\+C\+H\+A\+R\+G\+S().

\index{stringsup.\+h@{stringsup.\+h}!M\+A\+T\+C\+H\+\_\+\+L\+EN@{M\+A\+T\+C\+H\+\_\+\+L\+EN}}
\index{M\+A\+T\+C\+H\+\_\+\+L\+EN@{M\+A\+T\+C\+H\+\_\+\+L\+EN}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{M\+A\+T\+C\+H\+\_\+\+L\+E\+N(char $\ast$str, char $\ast$pat)}{MATCH_LEN(char *str, char *pat)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int M\+A\+T\+C\+H\+\_\+\+L\+EN (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{str, }
\item[{char $\ast$}]{pat}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_ac85ba7d5161939102f1daf99dcae85f0}{}\label{stringsup_8h_ac85ba7d5161939102f1daf99dcae85f0}


Compare two strings limted to length of pattern. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & string to match. \\
\hline
\mbox{\tt in}  & {\em pat} & pattern to compare.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
string lenth on match. 

0 on no match. 
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Matches sub strings so be caeful. 
\end{DoxyWarning}


Definition at line 511 of file stringsup.\+c.

\index{stringsup.\+h@{stringsup.\+h}!M\+A\+T\+C\+H\+A\+R\+GS@{M\+A\+T\+C\+H\+A\+R\+GS}}
\index{M\+A\+T\+C\+H\+A\+R\+GS@{M\+A\+T\+C\+H\+A\+R\+GS}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{M\+A\+T\+C\+H\+A\+R\+G\+S(char $\ast$str, char $\ast$pat, int min, int argc)}{MATCHARGS(char *str, char *pat, int min, int argc)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int M\+A\+T\+C\+H\+A\+R\+GS (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{str, }
\item[{char $\ast$}]{pat, }
\item[{int}]{min, }
\item[{int}]{argc}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_ae330bc7e8f9c442404f44ca0187b27d3}{}\label{stringsup_8h_ae330bc7e8f9c442404f44ca0187b27d3}


Match two strings and compare argument index Display message if the number of arguments is too few. 


\begin{DoxyParams}{Parameters}
{\em str} & string to test \\
\hline
{\em pat} & pattern to match \\
\hline
{\em min} & minumum number or arguments \\
\hline
{\em argc} & actual number of arguments \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 on match, 0 on no match or too few arguments 
\end{DoxyReturn}


Definition at line 471 of file stringsup.\+c.



Referenced by fatfs\+\_\+tests(), posix\+\_\+tests(), and user\+\_\+tests().

\index{stringsup.\+h@{stringsup.\+h}!M\+A\+T\+C\+HI@{M\+A\+T\+C\+HI}}
\index{M\+A\+T\+C\+HI@{M\+A\+T\+C\+HI}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{M\+A\+T\+C\+H\+I(char $\ast$str, char $\ast$pat)}{MATCHI(char *str, char *pat)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int M\+A\+T\+C\+HI (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{str, }
\item[{char $\ast$}]{pat}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a158b18efacfbaf45bf46e03f355cf101}{}\label{stringsup_8h_a158b18efacfbaf45bf46e03f355cf101}


Compare two strings without case. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & string to match. \\
\hline
\mbox{\tt in}  & {\em pat} & pattern to compare.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
string lenth on match. 

0 on no match. 
\end{DoxyReturn}


Definition at line 493 of file stringsup.\+c.

\index{stringsup.\+h@{stringsup.\+h}!M\+A\+T\+C\+H\+I\+\_\+\+L\+EN@{M\+A\+T\+C\+H\+I\+\_\+\+L\+EN}}
\index{M\+A\+T\+C\+H\+I\+\_\+\+L\+EN@{M\+A\+T\+C\+H\+I\+\_\+\+L\+EN}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{M\+A\+T\+C\+H\+I\+\_\+\+L\+E\+N(char $\ast$str, char $\ast$pat)}{MATCHI_LEN(char *str, char *pat)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int M\+A\+T\+C\+H\+I\+\_\+\+L\+EN (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{str, }
\item[{char $\ast$}]{pat}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_ab012fa46a47fa2430d6ebd25ed38c59e}{}\label{stringsup_8h_ab012fa46a47fa2430d6ebd25ed38c59e}


Compare two strings without case limted to length of pattern. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & string to match. \\
\hline
\mbox{\tt in}  & {\em pat} & pattern to compare.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
string lenth on match. 

0 on no match. 
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Matches sub strings so be caeful. 
\end{DoxyWarning}


Definition at line 537 of file stringsup.\+c.



Referenced by get\+\_\+value(), and match\+\_\+headers().

\index{stringsup.\+h@{stringsup.\+h}!memchr@{memchr}}
\index{memchr@{memchr}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{memchr(const void $\ast$str, int c, size\+\_\+t size)}{memchr(const void *str, int c, size_t size)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} void$\ast$ memchr (
\begin{DoxyParamCaption}
\item[{const void $\ast$}]{str, }
\item[{int}]{c, }
\item[{{\bf size\+\_\+t}}]{size}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a76693775d57cf00d7cdb2e793ffd73f1}{}\label{stringsup_8h_a76693775d57cf00d7cdb2e793ffd73f1}


find a character in a string of maximum size 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & string \\
\hline
\mbox{\tt in}  & {\em c} & character \\
\hline
\mbox{\tt in}  & {\em size} & string length to search \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
string length 
\end{DoxyReturn}


Definition at line 125 of file stringsup.\+c.

\index{stringsup.\+h@{stringsup.\+h}!nextspace@{nextspace}}
\index{nextspace@{nextspace}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{nextspace(char $\ast$ptr)}{nextspace(char *ptr)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} char$\ast$ nextspace (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{ptr}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a205ab859e76086c5239a49effa3281dd}{}\label{stringsup_8h_a205ab859e76086c5239a49effa3281dd}


Skip to first white space in a string -\/ tabs and spaces. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em ptr} & input string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to first white space character 
\end{DoxyReturn}


Definition at line 306 of file stringsup.\+c.



Referenced by process\+\_\+args().

\index{stringsup.\+h@{stringsup.\+h}!reverse@{reverse}}
\index{reverse@{reverse}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{reverse(char $\ast$str)}{reverse(char *str)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} void {\bf W\+E\+A\+K\+\_\+\+A\+TR} reverse (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{str}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a00b9d97be21e4f3f5df1019a803c05a6}{}\label{stringsup_8h_a00b9d97be21e4f3f5df1019a803c05a6}


Reverse a string in place Example\+: abcdef -\/$>$ fedcba. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & string \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
string length 
\end{DoxyReturn}


Definition at line 231 of file stringsup.\+c.

\index{stringsup.\+h@{stringsup.\+h}!sep@{sep}}
\index{sep@{sep}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{sep(void)}{sep(void)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} void sep (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_afb71eee07aa9545ed2ec23f865eea315}{}\label{stringsup_8h_afb71eee07aa9545ed2ec23f865eea315}


undo any existing macros 

undo any existing macros 

Definition at line 32 of file stringsup.\+c.



Referenced by setup().

\index{stringsup.\+h@{stringsup.\+h}!skipchars@{skipchars}}
\index{skipchars@{skipchars}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{skipchars(char $\ast$str, char $\ast$pat)}{skipchars(char *str, char *pat)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} char$\ast$ skipchars (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{str, }
\item[{char $\ast$}]{pat}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_aae86b90fc6ccc0c432de5c492cdcbaba}{}\label{stringsup_8h_aae86b90fc6ccc0c432de5c492cdcbaba}


Skip characters defined in user string. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & string \\
\hline
\mbox{\tt in}  & {\em pat} & pattern string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to string after skipped characters. 
\end{DoxyReturn}


Definition at line 328 of file stringsup.\+c.

\index{stringsup.\+h@{stringsup.\+h}!skipspaces@{skipspaces}}
\index{skipspaces@{skipspaces}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{skipspaces(char $\ast$ptr)}{skipspaces(char *ptr)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} char$\ast$ skipspaces (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{ptr}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a8cebaf955a9e3b5f1f2af105641dad40}{}\label{stringsup_8h_a8cebaf955a9e3b5f1f2af105641dad40}


Skip white space in a string -\/ tabs and spaces. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em ptr} & input string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to first non white space character 
\end{DoxyReturn}


Definition at line 289 of file stringsup.\+c.



Referenced by get\+\_\+token(), get\+\_\+value(), match\+\_\+headers(), parse\+\_\+http\+\_\+request(), split\+\_\+args(), timetests(), and token().

\index{stringsup.\+h@{stringsup.\+h}!split\+\_\+args@{split\+\_\+args}}
\index{split\+\_\+args@{split\+\_\+args}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{split\+\_\+args(char $\ast$str, char $\ast$argv[], int max)}{split_args(char *str, char *argv[], int max)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int split\+\_\+args (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{str, }
\item[{char $\ast$}]{argv\mbox{[}$\,$\mbox{]}, }
\item[{int}]{max}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a84aa635d9cf4f3d41608b9e5639f71e9}{}\label{stringsup_8h_a84aa635d9cf4f3d41608b9e5639f71e9}


Split string into arguments stored in argv\mbox{[}\mbox{]} We split source string into arguments Warning\+: source string is modified! To save memory each gap in the source string is terminated with an E\+OS This becomes the end of string for each argument returned Warning\+: Do N\+OT modify the source string or argument contents while using them You can reassign new pointers to the arguments if you like. 


\begin{DoxyParams}{Parameters}
{\em } & \\
\hline
\end{DoxyParams}


Definition at line 566 of file stringsup.\+c.



Referenced by user\+\_\+tasks().

\index{stringsup.\+h@{stringsup.\+h}!stralloc@{stralloc}}
\index{stralloc@{stralloc}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{stralloc(char $\ast$str)}{stralloc(char *str)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} char$\ast$ stralloc (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{str}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a354472f280e9fe08820d6f32e0feddae}{}\label{stringsup_8h_a354472f280e9fe08820d6f32e0feddae}


Allocate space for string. 


\begin{DoxyItemize}
\item Copies tring into allocated space.
\end{DoxyItemize}


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & user string.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to alocated string. 

N\+U\+LL on out of memory.
\end{DoxyReturn}
Allocate space for string.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em $\ast$str} & string to allocate and copy memory for \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\+: char $\ast$ pointer to allocated string 
\end{DoxyReturn}


Definition at line 774 of file stringsup.\+c.

\index{stringsup.\+h@{stringsup.\+h}!strcasecmp@{strcasecmp}}
\index{strcasecmp@{strcasecmp}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{strcasecmp(const char $\ast$str, const char $\ast$pat)}{strcasecmp(const char *str, const char *pat)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int {\bf W\+E\+A\+K\+\_\+\+A\+TR} strcasecmp (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str, }
\item[{const char $\ast$}]{pat}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a5b20054fe279135f819d1c561f081649}{}\label{stringsup_8h_a5b20054fe279135f819d1c561f081649}


Compare two strings without case. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & string to match. \\
\hline
\mbox{\tt in}  & {\em pat} & pattern to compare.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on match, $<$ 0 implies str sorts before pat, $>$ 0 implies str sorts after pat 
\end{DoxyReturn}


Definition at line 410 of file stringsup.\+c.



Referenced by file\+\_\+type(), http\+\_\+value(), and M\+A\+T\+C\+H\+I().

\index{stringsup.\+h@{stringsup.\+h}!strcat@{strcat}}
\index{strcat@{strcat}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{strcat(char $\ast$dest, const char $\ast$src)}{strcat(char *dest, const char *src)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} {\bf W\+E\+A\+K\+\_\+\+A\+TR} char$\ast$ strcat (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{dest, }
\item[{const char $\ast$}]{src}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a5c9fb6fae0723d90a3b652ad6d869eb4}{}\label{stringsup_8h_a5c9fb6fae0723d90a3b652ad6d869eb4}


Append string. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em dest} & string \\
\hline
\mbox{\tt in}  & {\em src} & string \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
string length 
\end{DoxyReturn}


Definition at line 199 of file stringsup.\+c.



Referenced by ls(), and upload().

\index{stringsup.\+h@{stringsup.\+h}!strcmp@{strcmp}}
\index{strcmp@{strcmp}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{strcmp(const char $\ast$str, const char $\ast$pat)}{strcmp(const char *str, const char *pat)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int {\bf W\+E\+A\+K\+\_\+\+A\+TR} strcmp (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str, }
\item[{const char $\ast$}]{pat}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_abee00aec80e542c31b536a531ffe761a}{}\label{stringsup_8h_abee00aec80e542c31b536a531ffe761a}


Compare two strings. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & string to match. \\
\hline
\mbox{\tt in}  & {\em pat} & pattern to compare.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on match, $<$ 0 implies str sorts before pat, $>$ 0 implies str sorts after pat 
\end{DoxyReturn}


Definition at line 362 of file stringsup.\+c.



Referenced by Find\+Font\+Name(), main(), M\+A\+T\+C\+H(), and stat().

\index{stringsup.\+h@{stringsup.\+h}!strcpy@{strcpy}}
\index{strcpy@{strcpy}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{strcpy(char $\ast$dest, const char $\ast$src)}{strcpy(char *dest, const char *src)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} {\bf W\+E\+A\+K\+\_\+\+A\+TR} char$\ast$ strcpy (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{dest, }
\item[{const char $\ast$}]{src}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_ad88a87f58b2b4a12f6644aa46ecc1baa}{}\label{stringsup_8h_ad88a87f58b2b4a12f6644aa46ecc1baa}


copy a string 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em dest} & destination string \\
\hline
\mbox{\tt in}  & {\em src} & source string \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
destination string 
\end{DoxyReturn}


Definition at line 161 of file stringsup.\+c.



Referenced by escape(), fatfs\+\_\+ls(), fatfs\+\_\+scan\+\_\+files(), ls(), main(), setup\+\_\+networking(), stralloc(), and strcat().

\index{stringsup.\+h@{stringsup.\+h}!strlen@{strlen}}
\index{strlen@{strlen}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{strlen(const char $\ast$str)}{strlen(const char *str)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} {\bf size\+\_\+t} {\bf W\+E\+A\+K\+\_\+\+A\+TR} strlen (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a895ea3a2f9901e4c962806cc15271339}{}\label{stringsup_8h_a895ea3a2f9901e4c962806cc15271339}


String Length. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & string \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
string length 
\end{DoxyReturn}


Definition at line 146 of file stringsup.\+c.

\index{stringsup.\+h@{stringsup.\+h}!strnalloc@{strnalloc}}
\index{strnalloc@{strnalloc}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{strnalloc(char $\ast$str, int len)}{strnalloc(char *str, int len)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} char$\ast$ strnalloc (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{str, }
\item[{int}]{len}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a11f9265694fbed4de67d91c6959a0d18}{}\label{stringsup_8h_a11f9265694fbed4de67d91c6959a0d18}


Allocate space for string with maximum size. 


\begin{DoxyItemize}
\item Copies tring into allocated space limited to maximum size.
\end{DoxyItemize}


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & user string. \\
\hline
\mbox{\tt in}  & {\em len} & maximum string length.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to alocated string. 
\end{DoxyReturn}


Definition at line 750 of file stringsup.\+c.

\index{stringsup.\+h@{stringsup.\+h}!strncasecmp@{strncasecmp}}
\index{strncasecmp@{strncasecmp}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{strncasecmp(const char $\ast$str, const char $\ast$pat, size\+\_\+t len)}{strncasecmp(const char *str, const char *pat, size_t len)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int {\bf W\+E\+A\+K\+\_\+\+A\+TR} strncasecmp (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str, }
\item[{const char $\ast$}]{pat, }
\item[{{\bf size\+\_\+t}}]{len}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_af2fdec8b4be40840ac03df58d48bcc8d}{}\label{stringsup_8h_af2fdec8b4be40840ac03df58d48bcc8d}


Compare two strings without case maximum len bytes in size. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & string to match. \\
\hline
\mbox{\tt in}  & {\em pat} & pattern to compare. \\
\hline
\mbox{\tt in}  & {\em len} & maximum string length for compare \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on match, $<$ 0 implies str sorts before pat, $>$ 0 implies str sorts after pat 
\end{DoxyReturn}


Definition at line 432 of file stringsup.\+c.



Referenced by M\+A\+T\+C\+H\+I\+\_\+\+L\+E\+N().

\index{stringsup.\+h@{stringsup.\+h}!strncat@{strncat}}
\index{strncat@{strncat}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{strncat(char $\ast$dest, const char $\ast$src, size\+\_\+t max)}{strncat(char *dest, const char *src, size_t max)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} {\bf W\+E\+A\+K\+\_\+\+A\+TR} char$\ast$ strncat (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{dest, }
\item[{const char $\ast$}]{src, }
\item[{{\bf size\+\_\+t}}]{max}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_af7f9d4db489856461ccf1c577b0035a5}{}\label{stringsup_8h_af7f9d4db489856461ccf1c577b0035a5}


Append string of at most N bytes from src. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em dest} & string \\
\hline
\mbox{\tt in}  & {\em src} & string \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
string length 
\end{DoxyReturn}


Definition at line 214 of file stringsup.\+c.



Referenced by html\+\_\+msg().

\index{stringsup.\+h@{stringsup.\+h}!strncmp@{strncmp}}
\index{strncmp@{strncmp}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{strncmp(const char $\ast$str, const char $\ast$pat, size\+\_\+t len)}{strncmp(const char *str, const char *pat, size_t len)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int {\bf W\+E\+A\+K\+\_\+\+A\+TR} strncmp (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str, }
\item[{const char $\ast$}]{pat, }
\item[{{\bf size\+\_\+t}}]{len}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_ac8c58d100b5e1ef176592486bb150bbc}{}\label{stringsup_8h_ac8c58d100b5e1ef176592486bb150bbc}


Compare two strings maximum len bytes in size. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & string to match. \\
\hline
\mbox{\tt in}  & {\em pat} & pattern to compare. \\
\hline
\mbox{\tt in}  & {\em len} & maximum string length for compare \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on match, $<$ 0 implies str sorts before pat, $>$ 0 implies str sorts after pat 
\end{DoxyReturn}


Definition at line 386 of file stringsup.\+c.



Referenced by M\+A\+T\+C\+H\+\_\+\+L\+E\+N(), match\+\_\+token(), and token().

\index{stringsup.\+h@{stringsup.\+h}!strncpy@{strncpy}}
\index{strncpy@{strncpy}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{strncpy(char $\ast$dest, const char $\ast$src, size\+\_\+t size)}{strncpy(char *dest, const char *src, size_t size)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} {\bf W\+E\+A\+K\+\_\+\+A\+TR} char$\ast$ strncpy (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{dest, }
\item[{const char $\ast$}]{src, }
\item[{{\bf size\+\_\+t}}]{size}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_acdb13cf3724e976e98a6178baf0a3ac5}{}\label{stringsup_8h_acdb13cf3724e976e98a6178baf0a3ac5}


copy a string of at most N characters 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em dest} & destination string \\
\hline
\mbox{\tt in}  & {\em src} & source string \\
\hline
\mbox{\tt in}  & {\em size} & maximum destination size \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
destination string 
\end{DoxyReturn}


Definition at line 179 of file stringsup.\+c.



Referenced by main(), readdir(), strerror\+\_\+r(), strnalloc(), strncat(), and user\+\_\+loop().

\index{stringsup.\+h@{stringsup.\+h}!strupper@{strupper}}
\index{strupper@{strupper}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{strupper(char $\ast$str)}{strupper(char *str)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} void {\bf W\+E\+A\+K\+\_\+\+A\+TR} strupper (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{str}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a25ac5a1dbdfa1d06d55448cd7b665d1d}{}\label{stringsup_8h_a25ac5a1dbdfa1d06d55448cd7b665d1d}


U\+P\+P\+E\+R\+C\+A\+SE a string. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & string \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}


Definition at line 253 of file stringsup.\+c.

\index{stringsup.\+h@{stringsup.\+h}!token@{token}}
\index{token@{token}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{token(char $\ast$str, char $\ast$pat)}{token(char *str, char *pat)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int token (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{str, }
\item[{char $\ast$}]{pat}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_ae9142769a957bcb8c0fad1934576f576}{}\label{stringsup_8h_ae9142769a957bcb8c0fad1934576f576}


Search for token in a string matching user pattern. 


\begin{DoxyItemize}
\item Skips all non printable A\+S\+C\+II characters before trying match.
\end{DoxyItemize}


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & string to search. \\
\hline
\mbox{\tt in}  & {\em pat} & pattern to search for.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
string lenth on match. 

0 on no match. 
\end{DoxyReturn}


Definition at line 671 of file stringsup.\+c.



Referenced by rcvr\+\_\+datablock(), and Read\+Bdf().

\index{stringsup.\+h@{stringsup.\+h}!tolower@{tolower}}
\index{tolower@{tolower}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{tolower(int c)}{tolower(int c)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int {\bf W\+E\+A\+K\+\_\+\+A\+TR} tolower (
\begin{DoxyParamCaption}
\item[{int}]{c}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a1825e0085bbbce998b39f9ff2682173c}{}\label{stringsup_8h_a1825e0085bbbce998b39f9ff2682173c}


Convert character to lower case, only if it is upper case. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em c} & character.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
character or lowercase value or character 
\end{DoxyReturn}


Definition at line 96 of file stringsup.\+c.



Referenced by mkfs().

\index{stringsup.\+h@{stringsup.\+h}!toupper@{toupper}}
\index{toupper@{toupper}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{toupper(int c)}{toupper(int c)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} int {\bf W\+E\+A\+K\+\_\+\+A\+TR} toupper (
\begin{DoxyParamCaption}
\item[{int}]{c}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a96a73ab9e374d97a249f39eb6875ba79}{}\label{stringsup_8h_a96a73ab9e374d97a249f39eb6875ba79}


Convert character to upper case, only if it is lower case. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em c} & character.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
character or upper case value or character 
\end{DoxyReturn}


Definition at line 112 of file stringsup.\+c.



Referenced by Read\+Bdf(), strcasecmp(), strncasecmp(), and strupper().

\index{stringsup.\+h@{stringsup.\+h}!trim\+\_\+tail@{trim\+\_\+tail}}
\index{trim\+\_\+tail@{trim\+\_\+tail}!stringsup.\+h@{stringsup.\+h}}
\subsubsection[{\texorpdfstring{trim\+\_\+tail(char $\ast$str)}{trim_tail(char *str)}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+E\+M\+S\+P\+A\+CE} void trim\+\_\+tail (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{str}
\end{DoxyParamCaption}
)}\hypertarget{stringsup_8h_a2d7ec9dae4f58c027edbc22118714ba6}{}\label{stringsup_8h_a2d7ec9dae4f58c027edbc22118714ba6}


Trim White space and control characters from end of string. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Overwrites White space and control characters with E\+OS.
\end{DoxyWarning}
Trim White space and control characters from end of string.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em $\ast$str} & string to remove quotes from \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\+: void 
\end{DoxyReturn}


Definition at line 271 of file stringsup.\+c.

